#include "2048game.h"
#include <unistd.h>
#include "lcd.h"
#include "bmp.h"
#include "touch.h"
#include "album.h"
#include "wuzi.h"
#include "presce.h"


int scr(char *a)
{
    show_pure_color( 0xFFFF00 );
    system("madplay -Q  123.mp3  &");
    show_bmp(125,250,"xiangce.bmp");
    show_bmp(225,250,"wuziqi.bmp");
	show_bmp(325,250,"2048youxi.bmp");
    int x,y,z;
    while(1)
    {
    get_touch(&x,&y);
    if((x>-250&&x<=350)&&(y>=250&&y<=350))
    {
        show_pure_color( 0xFFFF00 );
         if(album( a )==0)
         {
            system( "killall  -9 madplay" );
            scr(a);
         }
        
        return 0;
        
       
    }
    else if((x>-450&&x<=550)&&(y>=250&&y<=350))
    {
        show_pure_color( 0xFFFF00 );
        if(wuzi()==0)
        {
            scr(a);
        }
        
        return 0;
    }
    else if((x>-650&&x<=750)&&(y>=250&&y<=350))
    {
        show_pure_color( 0xFFFF00 );
         if(my_2048game()==0)
         {
            system( "killall  -9 madplay" );
            scr(a);
         }
         
          return 0;
    }
    }
}